package org.javaboy;

import java.util.Comparator;
import java.util.function.BiFunction;
import java.util.function.Function;

public class Demo02 {
    public static void main(String[] args) {
        BiFunction<Integer, Integer, Integer> addMethod = (a, b) -> a + b;
        Integer result1 = addMethod.apply(1, 2);
        System.out.println("result1 = " + result1);

        Function<String, String> f1 = a -> "hello " + a;
        String s = f1.apply("world");
        System.out.println("s = " + s);
    }
}
